<?php

class WebException extends Exception {
	private $Response;

	public function response() {
		return $this->Response;
	}

	public function setResponse($newValue) {
		$this->Response = $newValue;
		return $this;
	}

	public function __construct($response = null) {
		if (is_string($response))
			$response = new WebErrorResponse($response);
		$this->setResponse($response);
	}
}

?>